import { exInput, exImageFitSelect, exRequestData } from '@ve/common/components/extension'
export default {
  VERSION: '20220408',
  type: 'uiImage',
  name: '图片',
  icon: 'image-line',
  //数据别名
  // dataName: 'uiImage_data',
  //扩展
  extension: {
    api: exInput('Api接口', ''),
    method: exInput('获取fileListMethod', ''),
    imgMethod: exInput('回显Method', ''),
    getDataKey: exInput('获取数据Key', ''),
    // model: exInput('图片url', ''),
    width: exInput('宽度', '100px'),
    height: exInput('高度', '100px'),
    fit: exImageFitSelect('如何适应', 'fill'),
    // bigImage: {
    //   type: 'exBigImage',
    //   name: '预览图配置',
    //   value: [],
    // },
    backgroundSet: {
      type: 'exBigImage',
      name: '背景图配置',
      value: {
        // api: '',
        // method: '',
        // imgMethod: '',
        url: '',
      },
    },
    requestData: exRequestData(
      '回显参数',
      [
        { key: '#LIMIT#', value: 1 },
        { key: '#PAGE_SIZE#', value: 50 },
        { key: 'BUSINESS_TYPE', value: 1 },
      ],
      '回显所需参数'
    ),
  },
  //交互
  interaction: [],
  dataSourceBind: {
    sourceId: {
      type: 'exGetDataSource',
      name: '组件ID',
      value: {
        type: 1,
        source: [],
      },
    },
    // dataKey: exInput('数据Key', ''),
  },
  //条件、逻辑指令
  logicInstruction: [],
}
